import request from '@/utils/request'

// 查询自定义按钮配置列表
export function listOnlCgformHeadBtn(query) {
  return request({
    url: '/btn/onlCgformHeadBtn/list',
    method: 'get',
    params: query
  })
}

// 查询自定义按钮配置详细
export function getOnlCgformHeadBtn(id) {
  return request({
    url: '/btn/onlCgformHeadBtn/' + id,
    method: 'get'
  })
}

// 保存自定义按钮配置
export function saveOnlCgformHeadBtn(data) {
  return request({
    url: '/btn/onlCgformHeadBtn/save',
    method: 'post',
    data: data
  })
}

// 删除自定义按钮配置
export function delOnlCgformHeadBtn(id) {
  return request({
    url: '/btn/onlCgformHeadBtn/' + id,
    method: 'delete'
  })
}

// 导出自定义按钮配置
export function exportOnlCgformHeadBtn(query) {
  return request({
    url: '/btn/onlCgformHeadBtn/export',
    method: 'get',
    params: query
  })
}

// 查询自定义按钮配置详细
export function getListByFormId(id) {
  return request({
    url: '/btn/onlCgformHeadBtn/getListByFormId?headId=' + id,
    method: 'get'
  })
}
// 根据headId查询所有字段
export function getFieldListByHeadId(id) {
  return request({
    url: '/head/onlCgformHead/api/getFieldListByHeadId/' + id,
    method: 'get'
  })
}
